import 'dart:async';

import 'package:flutter/services.dart';

class PayLocalSign {
  static const MethodChannel _channel = const MethodChannel('pay_local_sign');

  ///获取支付宝订单信息
  static Future<String> getAlipayOrderInfo(String id, String title, String des) async {
    Map<String, String> params = {
      "id": id,
      "title": title,
      "des": des,
    };
    final String orderInfo = await _channel.invokeMethod('getAlipayOrderInfo', params);
    return orderInfo;
  }

  ///获取微信appid
  static Future<String> getWXAppId() async {
    final String wxAppId = await _channel.invokeMethod('getWXAppId');
    return wxAppId;
  }

  ///获取微信下单信息
  static Future<Map<dynamic, dynamic>> getWxOrderInfo() async {
    final Map<dynamic, dynamic> result = await _channel.invokeMethod('getWxOrderInfo');
    return result;
  }
}
